package com.service;

import com.dao.DicSysDao;
import com.dto.DicSysDTO;
import com.util.RestException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author linyukun
 * @date 2022/7/20 17:19
 */
@Service
public class DicSysServiceImpl {
    @Autowired
    private DicSysDao dicSysDao;

    public Object getByType(DicSysDTO dto) {
        String type = dto.getType();
        if(StringUtils.isBlank(type)){
            throw new RestException("请传递type参数");
        }
        return dicSysDao.getByType(type);
    }
}
